﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace DaBF.Models
{
    /// <summary>
    /// 文章实体
    /// </summary>
    public class Article:BaseModel
    {
        /// <summary>
        /// 文章ID
        /// </summary>
        public int id { get; set; }

        /// <summary>
        /// 文章标题
        /// </summary>
        [Required]
        public string Title { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        public string Auth { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        [Required]
        public DateTime PublishTime { get; set; }

        /// <summary>
        /// 是否置顶
        /// </summary>
        public bool isTop { get; set; }

        /// <summary>
        /// 是否发布
        /// </summary>
        public bool isPublish { get; set; }

        /// <summary>
        /// 是否轮播
        /// </summary>
        public bool isCarousel { get; set; }

        /// <summary>
        /// 轮播图片地址
        /// </summary>
        public string CarouselPath { get; set; }

        /// <summary>
        /// 封面图片地址
        /// </summary>
        public string CoverPath { get; set; }

        /// <summary>
        /// 文章内容
        /// </summary>
        public string Content { get; set; }

        [Required]
        /// <summary>
        /// 分类ID:必须
        /// </summary>
        public int CategoryID { get; set; }
    }
}
